var globalData = {
	server: "http://localhost:8080/",
	pre: "http://127.0.0.1:8020/venus-pre/",

	/*
	 * 设置用户ID
	 */
	setLoginUid: function(uid) {
		sessionStorage.setItem("uid", uid);
	},
	/*
	 * 设置用户名
	 */
	setLoginUname: function(uname) {
		sessionStorage.setItem("uname", uname);
	},
	/*
	 * 设置头像
	 */
	setLoginUimg: function(uimg) {
		sessionStorage.setItem("uimg", uimg);
	},
	/*
	 * 设置token
	 */
	setToken: function(token) {
		sessionStorage.setItem("token", token);
	},




	/*
	 * 获取登录的id
	 */
	getLoginUid: function() {
		return sessionStorage.getItem("uid");
	},
	/*
	 * 获取登录的姓名
	 */
	getLoginUname: function() {
		return sessionStorage.getItem("uname");
	},
	/*
	 * 获取登录的头像
	 */
	getLoginUimg: function() {
		return sessionStorage.getItem("uimg");
	},
	/*
	 * 获取token
	 */
	getToken: function() {
		return sessionStorage.getItem("token");
	},

	getCurRoleNames: function() {
		var rs = sessionStorage.getItem("roleNames");
		if(rs != null) {
			var arr = rs.split(",");
			var data = "[";
			for(var i = 0; i < arr.length; i++) {
				arr[i] = "\'" + arr[i] + "\'";
			}
			return eval("[" + arr.join() + "]");
		}

	}

};

/**
 * 引入layui和jquery等公共文件
 */


document.write('<script src="' + globalData.pre + 'lib/layui/layui.js"></script>');
document.write('<link rel="stylesheet" type="text/css" href="' + globalData.pre + 'lib/layui/css/layui.css">')